﻿#ifndef DIGITALKEYBOARD_H
#define DIGITALKEYBOARD_H

#include <QDialog>
#include <QKeyEvent>
namespace Ui {
class Digitalkeyboard;
}

class Digitalkeyboard : public QDialog {
  Q_OBJECT

 public:
  explicit Digitalkeyboard(QWidget* parent = nullptr);
  ~Digitalkeyboard();
  void setTheNumber(const QString& text);
  QString getTheNumber();
  bool isOk();

 private slots:
  void on_pushButton_num_0_clicked();
  void on_pushButton_num_1_clicked();
  void on_pushButton_num_2_clicked();
  void on_pushButton_num_3_clicked();
  void on_pushButton_num_4_clicked();
  void on_pushButton_num_5_clicked();
  void on_pushButton_num_6_clicked();
  void on_pushButton_num_7_clicked();
  void on_pushButton_num_8_clicked();
  void on_pushButton_num_9_clicked();
  void on_pushButton_num_10_clicked();
  void on_pushButton_num_11_clicked();
  void on_pushButton_num_12_clicked();
  void on_pushButton_num_13_clicked();
  void on_pushButton_ok_clicked();
  void on_pushButton_cancle_clicked();

 private:
  void keyPressEvent(QKeyEvent* e);

  bool is_ok = false;
  Ui::Digitalkeyboard* ui;
};

#endif  // DIGITALKEYBOARD_H
